package com.company.project.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.company.project.common.utils.EnumGroupType;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;
import java.util.Date;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 项目-团队表
 *
 * @author ls
 * @email *****@mail.com
 * @date 2021-02-02 20:34:19
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("match_project")
public class MatchProjectEntity extends BaseEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 项目ID
	 */
	@TableId("project_id")
	private String projectId;

	/**
	 * 项目名
	 */
	@TableField("project_name")
	private String projectName;

	/**
	 * 项目简介
	 */
	@TableField("project_brief")
	private String projectBrief;

	/**
	 * 参赛组别
	 */
	@TableField("group_name")
	private String groupName;
	
	@TableField(exist = false)
	private String groupCN;	
	
	/**
	 * 项目策划书
	 */
	@TableField("project_plan")
	private String projectPlan;

	/**
	 * 融资记录及计划
	 */
	@TableField("financing")
	private String financing;

	/**
	 * 附件
	 */
	@TableField("file")
	private String file;
	
	/**
	 * 附件
	 */
	@TableField("file_name")
	private String fileName;

	/**
	 * 创建时间
	 */
	@TableField(fill = FieldFill.INSERT)
	private Date createTime;

	/**
	 * 更新时间
	 */
	@TableField(fill = FieldFill.INSERT_UPDATE)
	private Date updateTime;

	/**
	 * 团队ID
	 */
	@TableField("team_id")
	private String teamId;

	/**
	 * 票数
	 */
	@TableField("vote")
	private Integer vote;

	/**
	 * 人为打分
	 */
	@TableField("score")
	private Integer score;

	/**
	 * 最终得分，排名的依据
	 */
	@TableField("final_score")
	private Integer finalScore;

	/**
	 * 排名
	 */
	@TableField("rank")
	private Integer rank;
	
	@TableField(exist = false)
    private String startTime;

    @TableField(exist = false)
    private String endTime;

	public String getGroupCN() {
		return EnumGroupType.getName(groupName);
	}
	
}
